/*************************************************************************
	> File Name: 001.brute_force.cpp
	> Author: Maureen 
	> Mail: Maureen@qq.com 
	> Created Time: 二  2/23 16:20:08 2021
 ************************************************************************/

#include <stdio.h>
#include <stdlib.h>

int match(char s[], char t[]) {
    for (int i = 0; s[i]; i++) {
        int flag = 1;
        for (int j = 0; t[j]; j++) {
            if (s[i + j] == t[j]) continue;
            flag = 0;
            break;
        }
        if (flag) return i;
    }
    return -1;
}

int main() {
    char s[100], t[100];
    while (~scanf("%s%s", s, t)) {
        printf("match(%s, %s) = %d\n", s, t, match(s, t));
    }
    return 0;
}
